#include <asm/asm.h>
#include <asm/regdef.h>
#include <cpu.h>
#include <asm/context.h>
#include <inst_ex_test.h>

####LEAF(n62_lhu_ex_test)
    .globl n62_lhu_ex_test
n62_lhu_ex_test:
    .set noreorder
    li  a0, 0x3E
###test inst
    TEST_LHU_EX(0x2b771238, 0xcd7ab654, 0x80108294, 0x000079f5, 0x000079f4, 0x2b771238, 0x8010fc89)
    TEST_LHU_EX(0x52b9c98a, 0x038f18a2, 0x80106024, 0x00000765, 0x00000764, 0x52b9c98a, 0x80106789)
    TEST_LHU_EX(0x0b634b3c, 0x566dadc2, 0x801024b4, 0x0000d5c3, 0x0000d5c0, 0x801124b4, 0x8010fa77)
    TEST_LHU_EX(0xfe29b934, 0xa15a0146, 0x8010628c, 0x000056cf, 0x000056cc, 0xfe29b934, 0x8010b95b)
    TEST_LHU_EX(0x9134bbd0, 0x9ef65910, 0x80107fa4, 0x0000537f, 0x0000537c, 0x9134bbd0, 0x8010d323)
    TEST_LHU_EX(0xb97e9785, 0xf7812ae2, 0x80102fbc, 0x00009c35, 0x00009c34, 0x80112fbc, 0x8010cbf1)
    TEST_LHU_EX(0x435cea68, 0x0dc5e542, 0x80100514, 0x0000b239, 0x0000b238, 0x80110514, 0x8010b74d)
    TEST_LHU_EX(0xa9cfb5d0, 0xcc8203da, 0x801053bc, 0x00005469, 0x00005468, 0xa9cfb5d0, 0x8010a825)
    TEST_LHU_EX(0x6ca0f3e8, 0xc568cc00, 0x8010aaa0, 0x00002b59, 0x00002b58, 0x6ca0f3e8, 0x8010d5f9)
    TEST_LHU_EX(0x2ec80f2f, 0x0fadad98, 0x80108e34, 0x000026ab, 0x000026a8, 0x2ec80f2f, 0x8010b4df)
    TEST_LHU_EX(0x3020328d, 0x46ca1abc, 0x8010bd60, 0x0000284d, 0x0000284c, 0x3020328d, 0x8010e5ad)
    TEST_LHU_EX(0x246fa5ac, 0xaf5e4660, 0x8010c068, 0x000013fb, 0x000013f8, 0x246fa5ac, 0x8010d463)
    TEST_LHU_EX(0x7de7c800, 0x3b10574c, 0x80102990, 0x000005c1, 0x000005c0, 0x7de7c800, 0x80102f51)
    TEST_LHU_EX(0xcd4ef991, 0x20fb3140, 0x80104c84, 0x000003cf, 0x000003cc, 0xcd4ef991, 0x80105053)
    TEST_LHU_EX(0x56ded63e, 0x8b8f0d78, 0x80107bec, 0x000081e3, 0x000081e0, 0x80117bec, 0x8010fdcf)
    TEST_LHU_EX(0x315bcf60, 0xde6f4454, 0x80103ea0, 0x00004203, 0x00004200, 0x315bcf60, 0x801080a3)
    TEST_LHU_EX(0x3d44f46f, 0x705b91d8, 0x80108de8, 0x00006889, 0x00006888, 0x3d44f46f, 0x8010f671)
    TEST_LHU_EX(0x3e263250, 0xb3274dbc, 0x80100000, 0x0000bbc3, 0x0000bbc0, 0x80110000, 0x8010bbc3)
    TEST_LHU_EX(0x7a60fb90, 0x4bc9061f, 0x80100000, 0x000032ad, 0x000032ac, 0x7a60fb90, 0x801032ad)
    TEST_LHU_EX(0xf38e2540, 0x500654e8, 0x80100000, 0x0000dfb5, 0x0000dfb4, 0x80110000, 0x8010dfb5)
    TEST_LHU_EX(0xf03bf40c, 0x951548a8, 0x80100000, 0x0000f5d9, 0x0000f5d8, 0x80110000, 0x8010f5d9)
    TEST_LHU_EX(0x3dc94d7b, 0x8f4c8460, 0x80100000, 0x0000fa79, 0x0000fa78, 0x80110000, 0x8010fa79)
    TEST_LHU_EX(0x3c0eb1ea, 0x25e8f058, 0x80100000, 0x00005785, 0x00005784, 0x3c0eb1ea, 0x80105785)
    TEST_LHU_EX(0xb79d4e50, 0xf006f0b0, 0x80100000, 0x00000eb7, 0x00000eb4, 0xb79d4e50, 0x80100eb7)
    TEST_LHU_EX(0x8e43a8b9, 0xa27eb0da, 0x80100000, 0x0000d03f, 0x0000d03c, 0x80110000, 0x8010d03f)
    TEST_LHU_EX(0xf69b3684, 0x61e4a6c4, 0x80100000, 0x000084d7, 0x000084d4, 0x80110000, 0x801084d7)
    TEST_LHU_EX(0x9e20517a, 0x4ffe6b68, 0x80100000, 0x0000828f, 0x0000828c, 0x80110000, 0x8010828f)
    TEST_LHU_EX(0x90c51138, 0xa6cf02f6, 0x80100000, 0x0000ed81, 0x0000ed80, 0x80110000, 0x8010ed81)
    TEST_LHU_EX(0xb3595d00, 0x49abbc20, 0x80100000, 0x00007529, 0x00007528, 0xb3595d00, 0x80107529)
    TEST_LHU_EX(0xc50cf398, 0xc593cc42, 0x80100000, 0x00002005, 0x00002004, 0xc50cf398, 0x80102005)
    TEST_LHU_EX(0x240d33e0, 0xcadf6c62, 0x80100000, 0x0000f947, 0x0000f944, 0x80110000, 0x8010f947)
    TEST_LHU_EX(0xfa116800, 0x5994e64e, 0x80110000, 0x00000001, 0x00000000, 0xfa116800, 0x80110001)
    TEST_LHU_EX(0xc569c06d, 0x004ee4fc, 0x80110000, 0x00000003, 0x00000000, 0xc569c06d, 0x80110003)
    TEST_LHU_EX(0x5623c324, 0xebf31185, 0x80110000, 0x00000001, 0x00000000, 0x5623c324, 0x80110001)
    TEST_LHU_EX(0xf1e9ea46, 0x2786ac69, 0x80110000, 0x00000003, 0x00000000, 0xf1e9ea46, 0x80110003)
    TEST_LHU_EX(0xba58280e, 0xa81c93b0, 0x80110000, 0x00000001, 0x00000000, 0xba58280e, 0x80110001)
    TEST_LHU_EX(0xc04c296d, 0x04e7f0cf, 0x80110000, 0x00000003, 0x00000000, 0xc04c296d, 0x80110003)
    TEST_LHU_EX(0x5589faf7, 0x6f3ed85c, 0x80110000, 0x00000001, 0x00000000, 0x5589faf7, 0x80110001)
    TEST_LHU_EX(0x1fbd3a80, 0x7d79925b, 0x80110000, 0x00000001, 0x00000000, 0x1fbd3a80, 0x80110001)
    TEST_LHU_EX(0xb8b5f450, 0x18211ee6, 0x80110000, 0x00000001, 0x00000000, 0xb8b5f450, 0x80110001)
    TEST_LHU_EX(0x493c08ca, 0x042e1bad, 0x80110000, 0x00000003, 0x00000000, 0x493c08ca, 0x80110003)
    TEST_LHU_EX(0x4a4dcac0, 0xe31d1ec0, 0x80110000, 0x00000001, 0x00000000, 0x4a4dcac0, 0x80110001)
    TEST_LHU_EX(0x2d85fd10, 0x00ef46c0, 0x80110000, 0x00000001, 0x00000000, 0x2d85fd10, 0x80110001)
    TEST_LHU_EX(0x75bd3dfd, 0xad640570, 0x80110000, 0x00000001, 0x00000000, 0x75bd3dfd, 0x80110001)
    TEST_LHU_EX(0xf36ce880, 0x3e25e330, 0x80110000, 0x00000001, 0x00000000, 0xf36ce880, 0x80110001)
    TEST_LHU_EX(0x9ebc14fc, 0x474e7166, 0x80110000, 0x00000001, 0x00000000, 0x9ebc14fc, 0x80110001)
    TEST_LHU_EX(0x761733ec, 0x3189e608, 0x80110000, 0x00000001, 0x00000000, 0x761733ec, 0x80110001)
    TEST_LHU_EX(0x0d96da75, 0x0c039df0, 0x80110000, 0x00000003, 0x00000000, 0x0d96da75, 0x80110003)
    TEST_LHU_EX(0xd6fa9910, 0xaf7a42ec, 0x80110000, 0x00000003, 0x00000000, 0xd6fa9910, 0x80110003)
    TEST_LHU_EX(0x91032bf8, 0x8c7be3fe, 0x80110000, 0x00000003, 0x00000000, 0x91032bf8, 0x80110003)
    TEST_LHU_EX(0xe6140e60, 0xbe85d7c8, 0x80110000, 0x00000003, 0x00000000, 0xe6140e60, 0x80110003)
    TEST_LHU_EX(0x9794072e, 0x75b84538, 0x80110000, 0x00000003, 0x00000000, 0x9794072e, 0x80110003)
    TEST_LHU_EX(0x2045b5c7, 0xf03d23b6, 0x80110000, 0x00000003, 0x00000000, 0x2045b5c7, 0x80110003)
    TEST_LHU_EX(0xf6630910, 0x91d90bff, 0x80110000, 0x00000001, 0x00000000, 0xf6630910, 0x80110001)
    TEST_LHU_EX(0x8aa76658, 0x51061398, 0x80110000, 0x00000001, 0x00000000, 0x8aa76658, 0x80110001)
    TEST_LHU_EX(0x6a7ecf20, 0x70309640, 0x80110000, 0x00000001, 0x00000000, 0x6a7ecf20, 0x80110001)
    TEST_LHU_EX(0x0981dc4a, 0x8604f605, 0x80110000, 0x00000003, 0x00000000, 0x0981dc4a, 0x80110003)
    TEST_LHU_EX(0x8ecf0aee, 0x181ee3be, 0x80110000, 0x00000003, 0x00000000, 0x8ecf0aee, 0x80110003)
    TEST_LHU_EX(0x14f05537, 0xa27b9a22, 0x80110000, 0x00000001, 0x00000000, 0x14f05537, 0x80110001)

###detect exception
###score ++
    addiu s3, s3, 1
###output a0|s3
inst_error:
    sw s3, 0($23)
    sw a0, 0(s1)
    jr ra
    nop
####END(n62_lhu_ex_test)
